#ifndef HUB_HPP_INCLUDED
#define HUB_HPP_INCLUDED

#include "../define.hpp"
#include "Animation.hpp"
#include "../App.hpp"
#include "../FileParser.hpp"
#include "../ressource/RessourceManager.hpp"
#include "../ressource/ImageRessource.hpp"

enum DisplayType
{
    Life,
    Banana
};

class Hub
{
    public:

    Hub(App* appPtr = 0,int *life = 0,int *Banana = 0);

    void Loading();

    void SetTitle(std::string TitleMap);

    void SetDisplay(DisplayType Type);

    sf::Sprite DrawHub(int NumberOfTime);

    sf::String DrawTitle();

    void UpdateHub(float ElapsedTime);

    private:

    ImageRessource* m_Number_I[10];
    sf::Sprite m_Number_S[10];

    Animation m_Ballon;
    Animation m_Banana;

    int* m_Banana_int;
    int* m_Ballon_int;

    bool m_Display_banana;
    bool m_Display_Life;

    float m_LastDisplayTime;

    sf::Clock m_DisplayTime;

    sf::String m_Title;

    // pointer on App
    App* m_app;
};

#endif // HUB_HPP_INCLUDED
